import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:xiaotiancai/style.dart';

class MemberShipCenter extends StatefulWidget{
  const MemberShipCenter({super.key});
  @override
  State<StatefulWidget> createState()=>_MemberShipCenter();
}
class _MemberShipCenter extends State<MemberShipCenter>{
  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Container(
        color: Style.background,
        child: SingleChildScrollView(
          child: Column(children: [
            Container(
              color: const Color(0xffff7800),
              child: const Padding(
                padding: EdgeInsets.only(top: 10),
                child: Center(
                  child: Text("会员中心",style: TextStyle(
                      fontSize: 16,color: Colors.white
                  ),),
                ),
              ),
            ),
            Container(
              width: double.infinity,
              height: 500,
              decoration:  BoxDecoration(
                  gradient: LinearGradient(colors: [
                    const Color(0xffff7800),
                    const Color(0xffffffff),
                    Style.background
                  ],begin: Alignment.topCenter,
                      end: Alignment.bottomCenter)
              ),
              child: Padding(
                padding: const EdgeInsets.all(20),
                child: Container(
                  decoration: BoxDecoration(
                      color: Style.background3,
                      borderRadius: const BorderRadius.all(Radius.circular(15))
                  ),
                  child: Column(
                    children: [
                      Padding(
                        padding: const EdgeInsets.symmetric(horizontal: 20,vertical: 20),
                        child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,children: [
                          Row(children: [
                            Container(
                              padding: const EdgeInsets.all(25),
                              decoration: const BoxDecoration(image: DecorationImage(image: NetworkImage("https://static-assets-prod.okii.com/xtc-products/z8/pc/scene-section/bg5.jpg"),
                                  fit: BoxFit.cover),
                                  shape: BoxShape.circle),
                            ),
                            const SizedBox(width: 10,),
                            Column(crossAxisAlignment: CrossAxisAlignment.start,children: [
                              Text("昵称昵称昵称",style: TextStyle(color: Style.font1),),
                              Container(
                                padding: const EdgeInsets.symmetric(horizontal: 5),
                                decoration:  BoxDecoration(
                                    color: Style.font1,
                                    borderRadius: const BorderRadius.all(Radius.circular(10))
                                ),
                                child: Row(children: [
                                  Icon(Icons.ac_unit,size: 15,color: Style.background,),
                                  Text("XXX会员",style: TextStyle(color: Style.background,fontSize: 10),)
                                ],),
                              )
                            ],),
                          ],),

                          InkWell(onTap:(){

                          },child:  Padding(padding: const EdgeInsets.all(10),child: Icon(Icons.qr_code,color: Style.font1,)))
                        ],),
                      ),
                      Padding(
                        padding: const EdgeInsets.only(left: 20,top: 25),
                        child: Row(children: [
                          Column(children: [
                            Text("0",style: TextStyle(color: Style.font1,fontWeight: FontWeight.bold,fontSize: 20),),
                            Text("天才豆",style: TextStyle(color: Style.font1,fontWeight: FontWeight.bold)),
                          ],),
                          const SizedBox(width: 20,),
                          Column(children: [
                            Text("0",style: TextStyle(color: Style.font1,fontWeight: FontWeight.bold,fontSize: 20)),
                            Text("优惠券",style: TextStyle(color: Style.font1,fontWeight: FontWeight.bold)),
                          ],),
                        ],),
                      ),
                      Expanded(child: Padding(
                        padding: const EdgeInsets.all(20),
                        child: Container(
                          decoration: BoxDecoration(
                              color: Style.background3,
                              boxShadow: [
                                BoxShadow(
                                    color: Style.font1.withAlpha(50),
                                    spreadRadius: 10,
                                    blurRadius: 20
                                )
                              ],borderRadius: const BorderRadius.all(Radius.circular(10))
                          ),
                          child: Column(children: [
                            Center(child: Container(padding: const EdgeInsets.all(5),decoration: const BoxDecoration(
                                color: Color(0xffdaad66),
                                borderRadius: BorderRadius.all(Radius.circular(5))
                            ),child: const Text("会员尊享更多权益",style: TextStyle(color: Colors.white),))),
                            const Expanded(child: Center(child: Text("这里写具体会员权益"),))
                          ],),
                        ),
                      )),
                    ],
                  ),
                ),
              ),),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 20),
              child: Container(
                decoration: const BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.all(Radius.circular(10)),
                ),child: Padding(
                padding: const EdgeInsets.symmetric(
                    vertical: 10,
                    horizontal: 10
                ),
                child: Row(children: [
                  Expanded(flex: 1,child: Container(
                    decoration: const BoxDecoration(
                        color: Color(0xfffbfbfb),
                        borderRadius: BorderRadius.all(Radius.circular(10))
                    ),
                    child: Row(children: [
                      Expanded(child: Padding(
                        padding: const EdgeInsets.symmetric(vertical: 10,horizontal: 5),
                        child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: const [
                          Text("任务广场",style: TextStyle(
                              fontSize: 16,fontWeight: FontWeight.bold
                          ),),
                          Text("做任务领天才豆",style: TextStyle(color: Color(0xffb1b2bf),fontSize: 13),),
                        ],),
                      )),
                      const Padding(padding: EdgeInsets.only(right: 3),child: Icon(Icons.ac_unit,size: 35,))
                    ],),),),
                  const SizedBox(width: 10,),
                  Expanded(flex: 1,child: Container(
                    decoration: const BoxDecoration(
                        color: Color(0xfffbfbfb),
                        borderRadius: BorderRadius.all(Radius.circular(10))
                    ),
                    child: Row(children: [
                      Expanded(child: Padding(
                        padding: const EdgeInsets.symmetric(vertical: 10,horizontal: 5),
                        child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: const [
                          Text("兑换广场",style: TextStyle(
                              fontSize: 16,fontWeight: FontWeight.bold
                          )),
                          Text("买前先兑换券",style: TextStyle(color: Color(0xffb1b2bf),fontSize: 13)),
                        ],),
                      )),
                      const Padding(padding: EdgeInsets.only(right: 3),child: Icon(Icons.ac_unit,size: 35,))
                    ],),),),
                ],),
              ),),
            ),
            const Padding(padding: EdgeInsets.symmetric(vertical: 20),child: Text("尊享权益攻略",style: TextStyle(
                fontSize: 20
            ),)),
            const Text("下面是一些框框，略")
          ],),
        ),
      ),
    );
  }
}